import { IModalConfig } from '@/components/page-modal/type'
import { FormType } from '@/base-ui/base-form/type'
import { ActionDesc } from '@/global/constant'

const modalConfig: IModalConfig = {
  modalProps: {
    title: '修改密码'
  },
  formProps: {
    desc: ActionDesc.UserSearch,
    layout: { span: 24 },
    formConfig: {
      name: 'updatePwd',
      initialValues: {
        password1: '',
        password2: ''
        // sex: ['aaa', 'male']
      },
      size: 'middle',
      labelAlign: 'left',
      // labelCol: 输入框这些前面的文字的宽度
      labelCol: { flex: '80px' },
      // labelWrap：表单前面的label宽度(labelCol指定的flex)不够,那么他会进行自动换行
      // labelWrap: true,
      // wrapperCol: { span: 12 },
      colon: false
      // style: { minWidth: 500 }
    },
    itemsConfig: [
      {
        type: FormType.Password,
        prop: 'password2',
        label: '密码',
        name: 'username2',
        rules: [{ required: true }],
        input: {
          placeholder: '请输入密码'
        }
      },
      {
        type: FormType.Password,
        prop: 'password1',
        label: '确认密码',
        name: 'password1',
        rules: [{ required: true }],
        input: {
          placeholder: '请确认密码'
        }
      }
    ]
  }
}
export default modalConfig
